home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1998 June / Cd Pc Users 9.iso / prog / inst / url / frmopen.frm (.txt) next >
Encoding:
Visual Basic Form  |  1996-05-05  |  4.0 KB  |  127 lines

  1. VERSION 5.00
  2. Begin VB.Form frmOpenURL 
  3.    Caption         =   "Open a URL into the Default Internet Browser"
  4.    ClientHeight    =   2520
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5370
  8.    Icon            =   "frmOpen.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   2520
  11.    ScaleWidth      =   5370
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.Label Label3 
  14.       Alignment       =   1  'Right Justify
  15.       AutoSize        =   -1  'True
  16.       Caption         =   "Written for the VB Center Code Library"
  17.       BeginProperty Font 
  18.          Name            =   "Small Fonts"
  19.          Size            =   6.75
  20.          Charset         =   0
  21.          Weight          =   400
  22.          Underline       =   0   'False
  23.          Italic          =   0   'False
  24.          Strikethrough   =   0   'False
  25.       EndProperty
  26.       Height          =   165
  27.       Left            =   2940
  28.       TabIndex        =   3
  29.       Top             =   2040
  30.       Width           =   2355
  31.    End
  32.    Begin VB.Label Label2 
  33.       Alignment       =   1  'Right Justify
  34.       AutoSize        =   -1  'True
  35.       Caption         =   "http://www.geocities.com/SiliconValley/Way/6445"
  36.       BeginProperty Font 
  37.          Name            =   "MS Sans Serif"
  38.          Size            =   8.25
  39.          Charset         =   0
  40.          Weight          =   700
  41.          Underline       =   0   'False
  42.          Italic          =   0   'False
  43.          Strikethrough   =   0   'False
  44.       EndProperty
  45.       ForeColor       =   &H00800000&
  46.       Height          =   195
  47.       Left            =   960
  48.       TabIndex        =   2
  49.       Top             =   2280
  50.       Width           =   4365
  51.    End
  52.    Begin VB.Label Label1 
  53.       Caption         =   "Click the link below to open the URL ""http://www.microsoft.com"" into the Default Internet Browser:"
  54.       Height          =   375
  55.       Left            =   120
  56.       TabIndex        =   1
  57.       Top             =   120
  58.       Width           =   5055
  59.    End
  60.    Begin VB.Label URL 
  61.       AutoSize        =   -1  'True
  62.       Caption         =   "http://www.microsoft.com"
  63.       BeginProperty Font 
  64.          Name            =   "MS Sans Serif"
  65.          Size            =   8.25
  66.          Charset         =   0
  67.          Weight          =   400
  68.          Underline       =   -1  'True
  69.          Italic          =   0   'False
  70.          Strikethrough   =   0   'False
  71.       EndProperty
  72.       ForeColor       =   &H00FF0000&
  73.       Height          =   195
  74.       Left            =   120
  75.       TabIndex        =   0
  76.       Top             =   720
  77.       Width           =   1845
  78.    End
  79. Attribute VB_Name = "frmOpenURL"
  80. Attribute VB_GlobalNameSpace = False
  81. Attribute VB_Creatable = False
  82. Attribute VB_PredeclaredId = True
  83. Attribute VB_Exposed = False
  84. ' Written exclusively for VB Center by Marco Cordero.
  85. #If Win32 Then
  86. Private Declare Function ShellExecute Lib _
  87. "shell32.dll" Alias "ShellExecuteA" _
  88. (ByVal hwnd As Long, _
  89. ByVal lpOperation As String, _
  90. ByVal lpFile As String, _
  91. ByVal lpParameters As String, _
  92. ByVal lpDirectory As String, _
  93. ByVal nShowCmd As Long) As Long
  94. #Else
  95. Private Declare Function ShellExecute Lib _
  96. "shell.dll" _
  97. (ByVal hwnd As Integer, _
  98. ByVal lpOperation As String, _
  99. ByVal lpFile As String, _
  100. ByVal lpParameters As String, _
  101. ByVal lpDirectory As String, _
  102. ByVal nShowCmd As Integer) As Integer
  103. #End If
  104. Private Const SW_SHOWNORMAL = 1
  105. Private Sub Picture1_Click()
  106. Dim iret As Long
  107. ' open URL into the default internet browser
  108. iret = ShellExecute(Me.hwnd, _
  109. vbNullString, _
  110. "http://www.geocities.com/SiliconValley/Way/6445", _
  111. vbNullString, _
  112. "c:\", _
  113. SW_SHOWNORMAL)
  114. End Sub
  115. Private Sub Form_Load()
  116. End Sub
  117. Private Sub URL_Click()
  118. Dim iret As Long
  119. ' open URL into the default internet browser
  120. iret = ShellExecute(Me.hwnd, _
  121. vbNullString, _
  122. "http://www.microsoft.com", _
  123. vbNullString, _
  124. "c:\", _
  125. SW_SHOWNORMAL)
  126. End Sub
  127.